/*
 Navicat Premium Data Transfer

 Source Server         : localMySql
 Source Server Type    : MySQL
 Source Server Version : 80028
 Source Host           : localhost:3306
 Source Schema         : common_back

 Target Server Type    : MySQL
 Target Server Version : 80028
 File Encoding         : 65001

 Date: 14/01/2023 18:10:35
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for deparment
-- ----------------------------
DROP TABLE IF EXISTS `deparment`;
CREATE TABLE `deparment` (
                             `id` int NOT NULL AUTO_INCREMENT COMMENT '部门id',
                             `dept_name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '部门名称',
                             `dept_function` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '部门职能',
                             `leader` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '部门负责人',
                             `add_by` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建者',
                             `add_time` datetime NOT NULL COMMENT '创建时间',
                             `update_by` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改者',
                             `update_time` datetime DEFAULT NULL COMMENT '修改时间',
                             PRIMARY KEY (`id`),
                             UNIQUE KEY `dept_name` (`dept_name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='部门';

-- ----------------------------
-- Records of deparment
-- ----------------------------
BEGIN;
INSERT INTO `deparment` (`id`, `dept_name`, `dept_function`, `leader`, `add_by`, `add_time`, `update_by`, `update_time`) VALUES (1, '信诺项目组', 'dev', 'John', 'admin', '2022-09-11 16:55:02', NULL, NULL);
INSERT INTO `deparment` (`id`, `dept_name`, `dept_function`, `leader`, `add_by`, `add_time`, `update_by`, `update_time`) VALUES (2, '纵横四海后端项目组', 'dev', '吕先生', 'admin', '2022-09-11 16:55:46', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for emp
-- ----------------------------
DROP TABLE IF EXISTS `emp`;
CREATE TABLE `emp` (
                       `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
                       `name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '员工姓名',
                       `work_no` int DEFAULT NULL COMMENT '员工编号',
                       `work_record` text COLLATE utf8mb4_general_ci COMMENT '工作内容',
                       `salary` decimal(10,4) NOT NULL COMMENT '薪资',
                       `address` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '家庭地址',
                       PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='员工表';

-- ----------------------------
-- Records of emp
-- ----------------------------
BEGIN;
INSERT INTO `emp` (`id`, `name`, `work_no`, `work_record`, `salary`, `address`) VALUES (1, 'Richard', 17220001, 'Java工程师', 11.0000, '固戍');
INSERT INTO `emp` (`id`, `name`, `work_no`, `work_record`, `salary`, `address`) VALUES (2, 'Riddle', 17220000, '架构师', 41.0000, '深湾一号');
COMMIT;

-- ----------------------------
-- Table structure for post
-- ----------------------------
DROP TABLE IF EXISTS `post`;
CREATE TABLE `post` (
                        `id` int NOT NULL AUTO_INCREMENT COMMENT '岗位名称',
                        `post_name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位名称',
                        `post_salary` varchar(20) COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位薪资',
                        `add_by` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建者',
                        `add_time` datetime NOT NULL COMMENT '创建时间',
                        `update_by` datetime DEFAULT NULL COMMENT '修改者',
                        `update_time` datetime DEFAULT NULL COMMENT '修改时间',
                        PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='岗位';

-- ----------------------------
-- Records of post
-- ----------------------------
BEGIN;
INSERT INTO `post` (`id`, `post_name`, `post_salary`, `add_by`, `add_time`, `update_by`, `update_time`) VALUES (1, '后端工程师', '8000~1200', 'admin', '2022-08-11 15:49:55', NULL, NULL);
INSERT INTO `post` (`id`, `post_name`, `post_salary`, `add_by`, `add_time`, `update_by`, `update_time`) VALUES (2, '前端工程师', '7000~1100', 'admin', '2022-08-11 15:50:20', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
                        `id` int NOT NULL AUTO_INCREMENT COMMENT '用户id',
                        `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户姓名',
                        `user_name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '账号',
                        `password` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
                        `add_by` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建者',
                        `add_time` datetime NOT NULL COMMENT '添加时间',
                        `update_by` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改者',
                        `update_time` datetime DEFAULT NULL COMMENT '修改时间',
                        PRIMARY KEY (`id`),
                        UNIQUE KEY `user_name` (`user_name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户';

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` (`id`, `name`, `user_name`, `password`, `add_by`, `add_time`, `update_by`, `update_time`) VALUES (1, 'Zhangsan', '123abcd@qq.com', '123456', 'admin', '2022-08-11 00:08:34', NULL, NULL);
INSERT INTO `user` (`id`, `name`, `user_name`, `password`, `add_by`, `add_time`, `update_by`, `update_time`) VALUES (2, 'Lisi', '23456@qq.com', 'abcd', 'creater', '2022-09-11 21:24:01', NULL, NULL);
INSERT INTO `user` (`id`, `name`, `user_name`, `password`, `add_by`, `add_time`, `update_by`, `update_time`) VALUES (4, 'Wangwu', 'abcd@qq.com', '2333', 'admin', '2022-09-18 23:34:04', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for user_record
-- ----------------------------
DROP TABLE IF EXISTS `user_record`;
CREATE TABLE `user_record` (
                               `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
                               `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名',
                               `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '手机号',
                               `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '邮箱',
                               `profession` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '专业',
                               `age` tinyint unsigned DEFAULT NULL COMMENT '年龄',
                               `gender` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '性别 , 1: 男, 2: 女',
                               `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '状态',
                               `createtime` datetime DEFAULT NULL COMMENT '创建时间',
                               PRIMARY KEY (`id`),
                               UNIQUE KEY `idx_user_phone` (`phone`),
                               KEY `idx_user_name` (`name`),
                               KEY `idx_user_pro_age_sta` (`profession`,`age`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统用户表';

-- ----------------------------
-- Records of user_record
-- ----------------------------
BEGIN;
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (1, '吕布', '17799990000', 'lvbu666@163.com', '软件工程', 23, '1', '6', '2001-02-02 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (2, '曹操', '17799990001', 'caocao666@qq.com', '通讯工程', 33, '1', '0', '2001-03-05 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (3, '赵云', '17799990002', '17799990@139.com', '英语', 34, '1', '2', '2002-03-02 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (4, '孙悟空', '17799990003', '17799990@sina.com', '工程造价', 54, '1', '0', '2001-07-02 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (5, '花木兰', '17799990004', '19980729@sina.com', '软件工程', 23, '2', '1', '2001-04-22 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (6, '大乔', '17799990005', 'daqiao666@sina.com', '舞蹈', 22, '2', '0', '2001-02-07 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (7, '露娜', '17799990006', 'luna_love@sina.com', '应用数学', 24, '2', '0', '2001-02-08 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (8, '程咬金', '17799990007', 'chengyaojin@163.com', '工业化工', 38, '1', '5', '2001-05-23 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (9, '项羽', '17799990008', 'xiaoyu666@qq.com', '金属材料', 43, '1', '0', '2001-09-18 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (10, '白起', '17799990009', 'baiqi666@sina.com', '机械工程及其自动化', 27, '1', '2', '2001-08-16 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (11, '韩信', '17799990010', 'hanxin520@163.com', '无机非金属材料工程', 27, '1', '0', '2001-06-12 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (12, '荆轲', '17799990011', 'jingke123@163.com', '会计', 29, '1', '0', '2001-05-11 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (13, '兰陵王', '17799990012', 'lanlinwang666@126.com', '工程造价', 44, '1', '1', '2001-04-09 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (14, '狂铁', '17799990013', 'kuangtie@sina.com', '应用数学', 43, '1', '2', '2001-04-10 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (15, '貂蝉', '17799990014', '84958948374@qq.com', '软件工程', 40, '2', '3', '2001-02-12 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (16, '妲己', '17799990015', '2783238293@qq.com', '软件工程', 31, '2', '0', '2001-01-30 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (17, '芈月', '17799990016', 'xiaomin2001@sina.com', '工业经济', 35, '2', '0', '2000-05-03 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (18, '嬴政', '17799990017', '8839434342@qq.com', '化工', 38, '1', '1', '2001-08-08 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (19, '狄仁杰', '17799990018', 'jujiamlm8166@163.com', '国际贸易', 30, '1', '0', '2007-03-12 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (20, '安琪拉', '17799990019', 'jdodm1h@126.com', '城市规划', 51, '2', '0', '2001-08-15 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (21, '典韦', '17799990020', 'ycaunanjian@163.com', '城市规划', 52, '1', '2', '2000-04-12 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (22, '廉颇', '17799990021', 'lianpo321@126.com', '土木工程', 19, '1', '3', '2002-07-18 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (23, '后羿', '17799990022', 'altycj2000@139.com', '城市园林', 20, '1', '0', '2002-03-10 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (24, '姜子牙', '17799990023', '37483844@qq.com', '工程造价', 29, '1', '4', '2003-05-26 00:00:00');
INSERT INTO `user_record` (`id`, `name`, `phone`, `email`, `profession`, `age`, `gender`, `status`, `createtime`) VALUES (38, '诸葛亮', '17799990024', '374838664@qq.com', '奇门八卦', 30, '1', '4', '2022-10-26 23:07:48');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
